import request from "@/utils/request.js";

/**
 * 科室
 */
export function getDepartment(data) {
  return request.get("doctor/inquiry/list",data,{ noAuth : true});
}
/**
 * 医生列表
 */
export function getDoctorList(data) {
  return request.get("doctor/inquiry/doctorList",data,{ noAuth : true});
}
/**
 * 医生详情[传参医生id]
 */
export function getDoctorDetail(data) {
  return request.get("doctor/inquiry/doctorDetail",data,{ noAuth : true});
}
/**
 * 医生-关注/取消关注
 */
export function doctorFollow(data) {
  return request.post("doctor/inquiry/doctorFollow",data,{ noAuth : true});
}
/**
 * 医生-关注列表
 */
export function getFollowList(data) {
  return request.get("doctor/inquiry/followList",data,{ noAuth : true});
}
/**
 * 医生-热门医生
 */
export function getHotDoctor(data) {
  return request.get("doctor/inquiry/hotDoctor",data,{ noAuth : true});
}
/**
 * 问诊-添加患者
 */
export function addPatient(data) {
  return request.post("doctor/inquiry/addPatient",data,{ noAuth : true});
}
/**
 * 问诊-编辑患者
 */
export function editPatient(data) {
  return request.post("doctor/inquiry/editPatient",data,{ noAuth : true});
}
/**
 * 患者列表-健康档案
 */
export function getPatientList(data) {
  return request.get("doctor/inquiry/patientList",data,{ noAuth : true});
}
/**
 * 问诊-删除患者
 */
export function delPatient(data) {
  return request.post("doctor/inquiry/patientDel",data,{ noAuth : true});
}
/**
 * 图文问诊-创建订单
 */
export function createPicTextOrder(data) {
  return request.post("doctor/inquiry/create",data,{ noAuth : true});
}
/**
 * 图文问诊-支付
 */
export function payOfPicText(data) {
  return request.post("doctor/inquiry/submit",data,{ noAuth : true});
}
/**
 * 图文问诊-基本信息
 */
export function getInquiryInfo(data) {
  return request.get("doctor/inquiry/baseInfo",data,{ noAuth : true});
}
/**
 * 在线问诊-创建订单
 */
export function createOnlineOrder(data) {
  return request.post("doctor/inquiry/create_chat",data,{ noAuth : true});
}
/**
 * 在线问诊-支付
 */
export function payOfOnline(data) {
  return request.post("doctor/inquiry/submit_chat",data,{ noAuth : true});
}

/**
 * 音视频问诊-创建订单
 */
export function createAudioOrder(data) {
  return request.post("doctor/audio/create",data,{ noAuth : true});
}
/**
 * 音视频问诊-支付
 */
export function payOfAudio(data) {
  return request.post("doctor/audio/submit",data,{ noAuth : true});
}
/**
 * 音视频问诊-取消问诊
 */
export function cancelAudioOrder(data) {
  return request.post("doctor/audio/cancel",data,{ noAuth : true});
}

/**
 * 音视频问诊-发起通话
 */
export function rtcChatStart(data) {
  return request.get("doctor/audio/chatStart",data,{ noAuth : true});
}
/**
 * 音视频问诊-患者接听
 */
export function rtcChatAccept(data) {
  return request.get("doctor/audio/chatAccept",data,{ noAuth : true});
}
/**
 * 音视频问诊-结束通话
 */
export function rtcChatEnd(data) {
  return request.get("doctor/audio/chatEnd",data,{ noAuth : true});
}
/**
 * 异常结束重置通话状态
 */
export function chatEndIllegal(data) {
  return request.get("doctor/audio/chatEndIllegal",data,{ noAuth : true});
}


/**
 * 结束问诊
 */
export function endConsultation(data) {
  return request.post("doctor/inquiry/endConsultation",data,{ noAuth : true});
}
/**
 * 医生端结【type:1-图文  2-在线和视频】
 */
export function endDoctorConsultation(data) {
	return request.post('doctor/inquiry/endDoctorConsultation', data, {noAuth: true});
}
/**
 * 图文问诊记录顶部详情
 */
export function inquiryDetail(data) {
  return request.get("doctor/inquiry/inquiryDetail",data,{ noAuth : true});
}
/**
 * 【图文问诊沟通记录：】获取某次图文问诊详情记录
 * 传参 conversation_id
 */
export function getPicTextList(data) {
  return request.get("doctor/inquiry/getChatInfo",data,{ noAuth : true});
}
/**
 * 【图文问诊沟通记录：】添加图文问诊
 */
export function addPicTextList(data) {
  return request.post("doctor/inquiry/addChatInfo",data,{ noAuth : true});
}
/**
 * 获取正在会话的医生详情【传参会话id】
 */
export function getConvDoctorDetail(data) {
  return request.get("doctor/inquiry/getDoctorInfo",data,{ noAuth : true});
}
/**
 * 评价医生
 */
export function addDoctorEvaluate(data) {
  return request.post("doctor/inquiry/evaluate",data,{ noAuth : true});
}
/**
 * 【图文问诊沟通记录：】获取所有问诊记录
 * 传参 uid 、conversation_status【0-进行中 1-已完成】
 */
export function getPicTextAllLst(data) {
  return request.get("doctor/inquiry/orderList",data,{ noAuth : true});
}

/**
 * 获取会话状态
 */
export function getConversationStatus(data) {
  return request.get("doctor/inquiry/getChatStatus",data,{ noAuth : true});
}

/**
 * 获取收藏、关注数量
 */
export function getCollectNums(data) {
  return request.get("doctor/inquiry/getCollectNums",data,{ noAuth : true});
}
/**
 * 获取在线咨询订单列表
 */
export function getOnlineList(data) {
  return request.get("doctor/inquiry/chatOrderList",data,{ noAuth : true});
}
 /**
  * 家庭医生
  */
 export function familyDoctor(data) {
   return request.get("doctor/inquiry/familyDoctor",data,{ noAuth : true});
 }